package com.vivo.customer.dao;

import com.vivo.customer.entity.CustomerDecorationMap;
import com.vivo.customer.entity.CustomerDecorationMapHistory;
import com.vivo.customer.entity.CustomerDecorationMapHistoryExample;
import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface CustomerDecorationMapHistoryMapper {
    int countByExample(CustomerDecorationMapHistoryExample example);

    int deleteByExample(CustomerDecorationMapHistoryExample example);

    int deleteByPrimaryKey(String id);

    int insert(CustomerDecorationMapHistory record);

    int insertSelective(CustomerDecorationMapHistory record);

    List<CustomerDecorationMapHistory> selectByExample(CustomerDecorationMapHistoryExample example);

    CustomerDecorationMapHistory selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") CustomerDecorationMapHistory record, @Param("example") CustomerDecorationMapHistoryExample example);

    int updateByExample(@Param("record") CustomerDecorationMapHistory record, @Param("example") CustomerDecorationMapHistoryExample example);

    int updateByPrimaryKeySelective(CustomerDecorationMapHistory record);

    int updateByPrimaryKey(CustomerDecorationMapHistory record);
    
    @Insert("<script>insert into customer_decoration_map_history (id, fkRoom_Id, fkCustomer_Id,  " + 
    		"      dataId, create_time, lastModif_time,  " + 
    		"      addUser, remark, h_id, h_create_date,  " + 
    		"      h_Add_user, h_remarks, h_status " + 
    		"      ) " + 
    		"    values  " + 
    		"    <foreach collection=\"list\" item=\"item\" separator=\",\" > " + 
    		"    (#{item.id,jdbcType=CHAR}, #{item.fkroomId,jdbcType=CHAR}, #{item.fkcustomerId,jdbcType=CHAR},  " + 
    		"      #{item.dataid,jdbcType=CHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.lastmodifTime,jdbcType=TIMESTAMP},  " + 
    		"      #{item.adduser,jdbcType=CHAR}, #{item.remark,jdbcType=VARCHAR}, #{item.hId,jdbcType=CHAR}, #{item.hCreateDate,jdbcType=TIMESTAMP},  " + 
    		"      #{item.hAddUser,jdbcType=CHAR}, #{item.hRemarks,jdbcType=VARCHAR}, #{item.hStatus,jdbcType=VARCHAR} " + 
    		"      ) " + 
    		"   </foreach></script>")
    int insertList(List<CustomerDecorationMapHistory> list);
}